package com.huike.clues.mapper;

import com.huike.clues.domain.TbClue;
import com.huike.clues.domain.vo.FollowClueVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface TbFollowClueMapper {

    //插入线索跟进表
    @Insert("INSERT INTO tb_clue_track_record VALUES(null,#{clueId},#{createName}"+
            ",#{subject},#{record},#{level},now(),0,null,#{nextTime})")
    Integer addTrack(FollowClueVo followClueVo);

    @Update("update tb_clue set name = #{name} , sex = #{sex} , age = #{age} , weixin = #{weixin} , qq = #{qq}"+
            ",level = #{level} , subject = #{subject} , next_time = #{nextTime} , update_time = now()")
    Integer udClue(FollowClueVo followClueVo);

    List<TbClue> findClueTrack(Long clueId);
}
